package com.momo.momobackendjudgeservice.controller.inner;

import com.momo.momobackendjudgeservice.judge.JudgeService;
import com.momo.momobackendmodel.model.entity.QuestionSubmit;
import com.momo.momobackendserviceclient.service.JudgeFeginClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 十三
 * @create 2024-04-05 15:02
 * @Description:
 */
@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeginClient {

    @Resource
    private JudgeService judgeService;

    /**
     * 判题
     * @param questionSubmitId
     * @return
     */
    @Override
    @GetMapping("/do")
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId){
        return judgeService.doJudge(questionSubmitId);
    }
}
